/* 初始化样式 */

/* 所有样式 */
* {
	margin: 0px;
	padding: 0;
}

.nav {
	width: 100%;
	height: 44px;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
}

.nav a {
	color: #fff;
	text-decoration: none;
	width: 102px;
	text-align: center;
}

.nav .logo {
	height: 44px;
	background-image: url(../img/logo.svg);
	/* 不重复 */
	background-repeat: no-repeat;
	/* 背景居中 */
	background-position: center;
}

.nav .search {
	background-size: 18px 88px;
	height: 44px;
	background-image: url(../img/search.svg);
	/* 不重复 */
	background-repeat: no-repeat;
	/* 背景居中 */
	background-position: top;
}

.nav .buy {
	height: 44px;
	background-image: url(../img/buy.svg);
	/* 不重复 */
	background-repeat: no-repeat;

	/* 背景居中 */
	background-position: center;
}

.toggleBtn {
	height: 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
}

.toggleBtn .line {
	height: 1px;
	width: 18px;
	background: white;
	display: none;
	transition: 0.5s;
	transform-origin: left center;
}

.toggleBtn .line:nth-child(1) {
	position: absolute;
	left: calc(50% -9px);
	top: 14px;
}

.toggleBtn .line:nth-child(2) {
	position: absolute;
	left: calc(50% -9px);
	top: 26px;
}

.navpage {
    display: flex;
    width: 100vw;
	height: 0vh;
	transition: all 0.8s;
	overflow: hidden;
	position: fixed;
	left: 0;
    top: 0;
    background-color: #000;
}

.navpage .navMain{
    width: 100%;
}

/* 设定屏幕小鱼768像素时的样式 */
@media only screen and (max-width: 768px) {
	.toggleBtn {
		display: flex;
		z-index: 100;
		position: relative;
	}
	.nav .logo {
		z-index: 100;
	}
	.toggleBtn .line {
		display: block;
	}
	.nav .text,
	.nav .search {
		display: none;
	}
	.nav {
		justify-content: space-between;
	}
	.nav a,
	.nav label {
		width: 50px;
	}
	.nav .toggleBtn {
		order: 1;
	}
	.nav .logo {
		order: 2;
	}
	.nav .buy {
		order: 3;
	}

	#choose:checked ~ .toggleBtn .line:nth-child(1) {
		transform: rotate(45deg);
		transform-origin: left;
	}
	#choose:checked ~ .toggleBtn .line:nth-child(2) {
		transform: rotate(-45deg);
		transform-origin: left;
	}

	/* 设定复选框为选中状态时 导航页面显示*/
	#choose:checked ~ .navpage {
		display: flex;
		/*  
        vw:viewport的宽度
        vh:viewport的高度
        */
		width: 100vw;
		height: 100vh;
		position: fixed;
		left: 0;
		top: 0;
		background-color: #000;
		color: #fff;
		flex-direction: column;
		padding-top: 54px;
	}

	.searchInput {
		margin: 0 28px 20px;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		height: 36px;
		border-radius: 4px;
		color: #ccc;
		background-color: rgba(45, 45, 45, 0.98);
		overflow: hidden;
	}

	.searchInput .icon {
		width: 32px;
		height: 36px;
		background-size: 32px 72px;
		background-image: url(../img/search.svg);
		background-repeat: no-repeat;
		background-position: top;

		/* 
        注意：设定背景图时，要注意图片的url，重复，位置，尺寸
        */
	}

	.searchInput input {
		flex: 1;
		margin: 0 10px;
		height: 100px;
		background: transparent;
		/* none也可以 */
		border: none;
		outline: none;
		color: white;
	}

	.navpage hr {
		border-color: #595959;
	}

	.navList {
		margin: 0 38px;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
	}

	.navList a {
		width: 100%;
		height: 44px;
		text-align: left;
		border-bottom: 1px solid #333;
		line-height: 44px;
	}

	.navList a:last-child {
		border: none;
	}
}
